Skip to main content

Advanced Tag Replacer (REGEX)

The Advanced Tag Replacer provides powerful search and replace functionality for tags, attributes, and content using free text or REGEX patterns across your entire Flare project.

To use the Advanced Tag Replacer

  1. Click Advanced Tag Replacer from the Cleanup tab.
  2. Enter your search text in the Search for field:
    • Use free text for simple searches
    • Use REGEX patterns for advanced matching
  3. Click Search tags to find all matching tags in your project.
  4. Review the list of tags that will be affected.
  5. Select the action you want to perform:
    • Replace - Replace with a different tag
    • Unbind - Remove the tag but keep its content
    • Delete - Remove the tag and all its content
    • Wrap - Wrap the tag in another tag
  6. Enter or select the replacement tag (if applicable).
  7. Click Execute to apply changes.

Using REGEX Patterns

REGEX (Regular Expressions) allows you to match complex patterns:

Common REGEX Examples

  • <p class="Note.*"> - Match all paragraph classes starting with "Note"
  • <span style=".*color.*"> - Match spans with any color styling
  • <div.*id="temp.*"> - Match divs with IDs starting with "temp"

REGEX Tips

  • Use .* to match any characters
  • Use ^ to match the start of a string
  • Use $ to match the end of a string
  • Use [0-9] to match any digit
  • Test your REGEX patterns before executing

Actions Explained

Replace

Replaces the matched tag with a different tag while preserving content and compatible attributes.

Example: Replace <b> with <strong>

Unbind

Removes the tag wrapper but keeps all content inside.

Example: <span class="temp">text</span> becomes text

Delete

Removes both the tag and all its content.

Warning: This permanently deletes content. Use carefully!

Wrap

Wraps the matched tag in another tag.

Example: Wrap <p> in <div class="container">

Safety Features

  • Preview: See what will be affected before executing
  • Undo: Reverse changes immediately after execution
  • Backup: Create a backup before major replacements

Use Cases

  • Clean up legacy HTML from imports
  • Standardize inconsistent tagging
  • Remove temporary markup classes
  • Batch update styling approaches
  • Fix bulk tagging issues

Tips

  • Always back up your project before major replacements
  • Test on a small subset first when using REGEX
  • Use the preview to verify matches before executing
  • Keep the undo option available until you verify results
  • Document your REGEX patterns for future use